﻿@page
@model Blogifier.Register
@{
    ViewData["Title"] = "Edit";
    Layout = "~/Pages/Account/_Layout.cshtml";
}
<div class="form-login">
    @if (!User.Identity.IsAuthenticated)
    {
        <form asp-route-returnurl="@HttpContext.Request.Query["ReturnUrl"]" class="form" method="POST">
            <div class="bf-account-header">
                <h1>Register</h1>
                <p>You can register or go <a href="~/">back to blog</a>.</p>
            </div>
            <div asp-validation-summary="All" class="text-danger"></div>
            <input asp-for="UserName" class="form-control form-control form-control-top" placeholder="Username" autofocus>
            <input asp-for="Password" class="form-control form-control form-control-bottom" placeholder="Password">
            <input asp-for="ConfirmPassword" class="form-control form-control form-control-bottom" placeholder="Confirm">
            <button type="submit" class="btn btn-lg btn-primary btn-block">Sign in</button>
        </form>
    }
    else
    {
        <div class="bf-account-header mb-0">
            <div class="h5 mb-4">You are already signed in!</div>
            <div class="btn-group d-flex">
                <a href="~/" class="btn btn-outline-primary w-100">Blog</a>
                <a href="~/admin" class="btn btn-outline-primary w-100">Admin</a>
            </div>
        </div>
    }
</div>